<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',							'rb');
define('FOPEN_READ_WRITE',						'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',		'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',	'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',					'ab');
define('FOPEN_READ_WRITE_CREATE',				'a+b');
define('FOPEN_WRITE_CREATE_STRICT',				'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',		'x+b');

/*
|--------------------------------------------------------------------------
| Session 
|--------------------------------------------------------------------------
*/
define('SITE_PREFIX',                           '3FS');
define('SESSION_MESSAGE',                       SITE_PREFIX . '_MESSAGE');
define('SESSION_ERROR',                         SITE_PREFIX . '_ERROR');
define('SESSION_BACKURL',                       SITE_PREFIX . '_BACKURL');
/*
|--------------------------------------------------------------------------
| Cache Static 
|--------------------------------------------------------------------------
*/
define('UPDATE_JS',                             time());
define('VL_USERNAME_MINLENGTH',                 5);
define('VL_USERNAME_MAXLENGTH',                 30);
define('VL_PASSWORD_MINLENGTH',                 5);
define('VL_NAME_MINLENGTH',                     2);
define('VL_NAME_STADIUM_MAXLENGTH',             100);
define('VL_NAME_MAXLENGTH',                     150);
define('VL_SHORT_MINLENGTH',                    5);
define('VL_SHORT_MAXLENGTH',                    250);
define('VL_CONTENT_MINLENGTH',                  20);
define('VL_COUNTRY_LENGTH',                     2);
define('VL_TAG_MAXLENGTH',                      100);
define('VL_FIRSTNAME_MINLENGTH',                 2);
define('VL_FIRSTNAME_MAXLENGTH',                50);
define('VL_LASTNAME_MINLENGTH',                 2);
define('VL_LASTNAME_MAXLENGTH',                 2);
define('VL_NICKNAME_MAXLENGTH',                 50);
define('VL_NICKNAME_MINLENGTH',                 2);
define('IMAGE_SIZE',                            3);//mb
/*
|--------------------------------------------------------------------------
| Role Administrator 
|--------------------------------------------------------------------------
*/
define('ROLE_ROOT',                       		5);
define('ROLE_ADMINISTRATOR',					4);
define('ROLE_LEADER',							3);
define('ROLE_MEMBER',							2);
define('ROLE_FREELANCER',						1);
/*
|--------------------------------------------------------------------------
| Host 
|--------------------------------------------------------------------------
*/
define('DOMAIN',                                'sport.dev');
define('HOST_FRONTEND',                         'http://' . DOMAIN . '/');
define('HOST_BACKEND',                          'http://admin.' . DOMAIN . '/');
define('HOST_UP',                         	 	'http://up.' . DOMAIN . '/');
define('HOST_LOCALE',                         	HOST_UP . 'locale/');
define('HOST_STATICS',                          'http://static.' . DOMAIN . '/');
define('HOST_SCOMMON',                          HOST_STATICS . 'common/');
define('HOST_SIMG',                          	HOST_STATICS . MOD_NAME . '/img/');
define('HOST_JS',                          		HOST_STATICS . MOD_NAME . '/js/');
define('HOST_UPLOAD',                          	HOST_UP);
define('HOST_CSS',                          	HOST_STATICS . MOD_NAME . '/css/');

define('DATA_UPLOAD_DIR',                       ROOT_DIR . '/data/upload/');
/*
|--------------------------------------------------------------------------
| Image
|--------------------------------------------------------------------------
*/
define('IMAGE_STANDARD_WIDTH',                  960);
define('IMAGE_AVATAR_WIDTH',                    150);
define('IMAGE_LOGO_SIZE',                       150);
define('IMAGE_THUMBNAIL_WIDTH',                 250);
define('IMAGE_THUMBNAIL_HEIGHT',                200);
define('IMAGE_MAX_UPLOAD_SIZE',                 10485760);//10MB
define('IMAGE_UPLOAD_DIR',                      DATA_UPLOAD_DIR .'club/');
define('LOCALE_DIR',                            DATA_UPLOAD_DIR .'locale/');
define('LANGUAGE_DIR',                          APPPATH . 'language/');


/*
|--------------------------------------------------------------------------
| Permision
|--------------------------------------------------------------------------
*/
define('PERMISSION_CREATE',                  1<<1);
define('PERMISSION_UPDATE',                  2);
define('PERMISSION_DELETE',                  3);
define('PERMISSION_SUSPEND',                 4);
define('PERMISSION_ACTIVE',                  5);
define('PERMISSION_ALL',                     6);

/*
|--------------------------------------------------------------------------
| Paging
|--------------------------------------------------------------------------
*/
define('PAGING_NUMBER',                     10);

/* End of file constants.php */
/* Location: ./application/config/constants.php */